package enums

type YesOrNo int

const (
	No  YesOrNo = iota //否
	Yes                // 是
)

func (p YesOrNo) String() string {
	switch p {
	case Yes:
		return "是"
	case No:
		return "否"
	default:
		return "请选择"
	}
}
func (p YesOrNo) Value() int {
	return int(p)
}
func GetYesOrNoList() []EnumText {
	yesOrNoList := []EnumText{
		{Text: Yes.String(), Value: Yes.Value()},
		{Text: No.String(), Value: No.Value()},
	}
	return yesOrNoList
}
